var stp0, stp1, stp2;
var mobId = 0;

function foreMob(){
	showMob(mobId + 1);
}

function backMob(){
	showMob(mobId - 1);
}

function showMob(id){
	stp0 = document.getElementById("step0");
	stp1 = document.getElementById("step1");
	stp2 = document.getElementById("step2");
	
	if(id < 0)
		id = pfImgs.length - 1;
	else if(id > pfImgs.length - 1)
		id = 0;
	
	mobId = id;
	stp0.src = pfImagePath + pfImgs[id] + ".jpg";
	//back
	if(id == 0)
		stp1.src = pfImagePath + pfImgs[pfImgs.length-1] + ".jpg";	
	else
		stp1.src = pfImagePath + pfImgs[id-1] + ".jpg";										
	//forward
	if(id == pfImgs.length - 1)
		stp2.src = pfImagePath + pfImgs[0] + ".jpg";	
	else
		stp2.src = pfImagePath + pfImgs[id+1] + ".jpg";
}	

function loadMob(){
	location.href = 'ShowPost.aspx?PostID=' + pfImgs[mobId];
}
